home *** CD-ROM | disk | FTP | other *** search
- Path: druid.borland.com!usenet
- From: pete@borland.com (Pete Becker)
- Newsgroups: comp.lang.c
- Subject: Re: C constant expression declarations
- Date: 16 Feb 1996 17:58:51 GMT
- Organization: Borland International
- Message-ID: <4g2gkr$cbc@druid.borland.com>
- References: <31229735.41C67EA6@isi.com>
- NNTP-Posting-Host: pbecker.borland.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- X-Newsreader: WinVN 0.99.5
-
- In article <31229735.41C67EA6@isi.com>, jstoner@isi.com says...
- >
- >This is a query (I have checked the FAQ) into something that strikes me
- >as a dumbfoundedly stupid issue, but I will ask it anyway :)
- >
- >Normally, I will do things such as:
- >
- > #define EXPR1 1
- > #define EXPR2 2
- >
- >...and so on. Lately, I have been observing in code from other people
- >equivalent declarations such as:
- >
- > #define EXPR1 (1)
- > #define EXPR2 (2)
- >
- >I have seen in the FAQ the business of declaring varargs macros that
- >are invoked with something like:
- >
- > DEBUG(("This is a printf string\n"))
- >
- >...but it does not seem relevant here.
- >
- >Is there, in fact, a reason for putting parens around "simple" constant
- >expressions? A reason that did not exist previously?
-
- No. It is a simple application of an overly simplistic rule. There is no need
- whatsoever for these parentheses. This is probably done by the same
- programmers who write things like return(0).
-
-